<template>
 <div>
       <div class="article-body">
        <p class="title">{{obj.title}}</p>
        <img :src="obj.pic" alt="">
      <div v-html="text" class="text"></div>
       </div>
  </div>
</template>

<script>
export default {
	data() {
		return{
			obj:{},
		 text:"",
		}
	},
	created() {
		let id=this.$route.query.id;
		this.$axios.get("https://api.it120.cc/small4/cms/news/detail",{
			params:{
			id:id
			}
		}).then((res)=>{
			this.obj=res.data.data;
			this.text=res.data.data.content
		})
	}
};
</script>

<style scoped>
	.article-body{
		margin-top: 70px;
	}
	.title {
	  margin-bottom: 10px;
	  height: 40px;
	  line-height: 40px;
	  text-align: center;
	  font-weight: 500;
	  font-size: 22px;
	}
	.article-body img {
	  display: block;
	  width: 359px;
	  height: 231px;
	  margin: 0 auto;
	}
	.text {
	  box-sizing: border-box;
	  padding: 10px;
	}
</style>
